public class PaginationProcess extends Pagination{
	//==== Fields =========
	private InputIO in=new InputIO();
	public static boolean SNTP=false;
	public static boolean SSetPage=false;
	public boolean FindData(){
		return false;
	}
	//==== move first page =========
	public boolean FirstPage(){
		First();
		return false;
	}
	//==== move back page =========
	public boolean BackPage(){
		Back();
		return false;
	}
	//==== move nex page =========
	public boolean NextPage(){
		Next();
		return false;
	}
	//==== move last page =========
	public boolean LastPage(){
		Last();
		return false;
	}
	//==== move to specific page =========
	public boolean NextToPage()
	{
		int d=0;
		if(SNTP==true){	
			d=Integer.parseInt(Main.shortcutString.trim());
			SNTP=false;
		}
		else{
				System.out.print("Input Page that you want to show : ");
				d=in.inputNumber();
		}
		int t=GetTotalPage()/PageShow;
		if(d<1){
			System.out.println("Sorry you can't input small than 1");
			in.input();	
			return false;
		}
		if(d>t){
			d=t+1;
		}
		NextToPage(d);
		return false;
	}
	//==== move to main page =========
	public void BackToMain(){
		if(Display.Lsearch==false){
				Display.Lsearch=true;
				Pagination.listNameFile=FileArtical.listFileName();
		}
		if(ArticalProcess.SRestore){
			Display.Lsearch=true;
			FileArtical.FolderContent="Content";
			Pagination.listNameFile=FileArtical.listFileName();
			ArticalProcess.SRestore=false;
			Display.SRestore=false;
			Display.ClearScreen(3);
		}
	}
	//==== move main restore page =========
	public void BackToMainRestore(){
		if(Display.SLRestore==true){
			Display.SLRestore=false;
			Pagination.listNameFile=FileArtical.listFileName();
		Display.ClearScreen(3);
		}
	}
	//==== set number of rows per page =========
	public boolean SetRowPage(){
		int d=0;
		if(SSetPage==true){
			d=Integer.parseInt(Main.shortcutString.trim());
			SSetPage=false;
		}
		else{
			System.out.println("Input new number of PageShow : ");
			d=in.inputNumber();
		}
		if(d<1){
			System.out.println("number of page show can't smaller than 0");
		}
		else if(d>GetTotalPage())
			System.out.println("Number of Page Show can't bigger than Total Aritical");
		else if(d>30)
			d=30;
		setRow(d);
		return false;
	}
}
